# -*- coding:utf-8 -*-
import requests
# 定义自动化登录类
class IhrmLoginApi():
    # 类方法装饰器
    @classmethod
    # 类方法获取接口 login_resp
    def ihrm_login_api(cls, json_data):
        login_resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                                   json=json_data)
        # 返回给调用
        return login_resp
if __name__ == '__main__':
    resp=IhrmLoginApi.ihrm_login_api({"mobile":"13800000002","password":"123456"})
    print(resp.json())